package com.style_transfer.dao;

import com.style_transfer.model.Image;
import com.style_transfer.model.Location;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LocationDao {
    @Select("select * from location where l_id = #{l_id}")
    public Location getLocationByID(@Param("l_id") int l_id);

    @Select("select * from location where l_name = #{l_name}")
    public Location getLocationByName(@Param("l_name") String l_name);

    @Select("select * from location")
    public List<Location> getAllLocation();

    public List<Image> getAllLocationByParent(@Param("parent") int parent);
}
